package com.example.web.controller;

import com.example.model.Department;
import com.example.web.swagger.IDepartmentController;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;

@RestController
public class DepartmentController implements IDepartmentController {

    @Override
    public List<Department> list() {
        return Arrays.asList(
                new Department(1L, "hello", "world"),
                new Department(2L, "good", "bye")
        );
    }

    public Department getDepartment(@RequestParam("id") Long id) {
        return new Department(1L, "hello", "world");
    }

}
